package com.mq.mqClient;

import lombok.Data;

import java.io.IOException;

/**
 * 用来创建连接的工厂类
 */
@Data
public class ConnectionFactory {
    //brokerServer的ip地址
    private String host;
    //端口号
    private int port;

    public Connection createConnection() throws IOException {
        Connection connection = new Connection(host, port);
        return connection;
    }

}
